package com.lanou3g.ptp.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel("任务类")
public class Task implements Serializable {

    @ApiModelProperty("任务id")
    private Long id;

    @ApiModelProperty("任务名")
    private String name;

    @ApiModelProperty("教学环节id")
    private Long teachlinkId;

    @ApiModelProperty("教学环节名")
    private String tlname;

    @ApiModelProperty("任务描述")
    private String description;

    @ApiModelProperty("基地id")
    private Long baseId;

    @ApiModelProperty("基地名")
    private String bname;

    @ApiModelProperty("讲师id(校内或校外讲师)")
    private Long baseTeacherId;

    @ApiModelProperty("负责老师1")
    private Long teacherId1;

    @ApiModelProperty("负责老师2")
    private Long teacherId2;

    @ApiModelProperty("经度")
    private String longitude;

    @ApiModelProperty("纬度")
    private String latitude;

    @ApiModelProperty("半径")
    private Integer radius;

    @ApiModelProperty("分配方式(0统一报名,1自主报名)")
    private Integer distribution;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("任务开始时间")
    private Date taskStartTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("任务结束时间")
    private Date taskEndTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("报名开始时间")
    private Date applyStartTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("报名结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date applyEndTime;

    @ApiModelProperty("评分类型(0五星制 1百分制)")
    private Integer gradingType;

    @ApiModelProperty("对基地教师的最终评教分数")
    private Integer evaluate;

    @ApiModelProperty("状态码:0未开始 1进行中 2任务结束 3学生自主提交 4老师审批不合格")
    private Integer status;

    @ApiModelProperty(name = "创建时间", hidden = true)
    private Date createTime;

    @ApiModelProperty(name = "更新时间", hidden = true)
    private Date updateTime;

    @ApiModelProperty("基地实体类属性")
    private Base base;

    @ApiModelProperty("教学环节实体类属性")
    private Teachlink teachlink;

    @ApiModelProperty("老师实体类属性")
    private User teacher1;

    private String baseTeacherName;
    private String baseName;

    public static final Integer STATUS_NOT_START = 0;
    public static final Integer STATUS_RUNNING = 1;
    public static final Integer STATUS_APPLY = 2;
    public static final Integer STATUS_UNPASS = 3;

}
